home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sources / xcalc / actions.h < prev    next >
C/C++ Source or Header  |  1994-09-27  |  4KB  |  85 lines

  1. /*
  2.  * $XConsortium: actions.h,v 1.5 91/01/10 11:51:05 rws Exp $
  3.  * 
  4.  * actions.h - action table declaring externally available procedures for xcalc
  5.  *
  6.  * Copyright 1989 by the Massachusetts Institute of Technology
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted, provided 
  10.  * that the above copyright notice appear in all copies and that both that 
  11.  * copyright notice and this permission notice appear in supporting 
  12.  * documentation, and that the name of M.I.T. not be used in advertising
  13.  * or publicity pertaining to distribution of the software without specific, 
  14.  * written prior permission. M.I.T. makes no representations about the 
  15.  * suitability of this software for any purpose.  It is provided "as is"
  16.  * without express or implied warranty.
  17.  *
  18.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  20.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  21.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  22.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  23.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  *
  25.  * Author:  Donna Converse, MIT X Consortium
  26.  */
  27.  
  28. extern void
  29.     add(), back(), bell(), clearit(), cosine(), decimal(),
  30.     degree(), digit(), divide(), e(), enter(), epower(), equal(),
  31.     exchange(), factorial(), 
  32.     inverse(), leftParen(), logarithm(), multiply(), naturalLog(),
  33.     negate(), nop(), off(), pi(), power(), quit(), recall(),
  34.     reciprocal(), rightParen(), roll(), scientific(), selection(), sine(),
  35.     square(), squareRoot(), store(), subtract(), sum(),
  36.     tangent(), tenpower(), XexchangeY();
  37.  
  38. /*
  39.  *     calculator action table
  40.  */
  41.  
  42. XtActionsRec    Actions[] = {
  43. {"add",        add},        /* addition */
  44. {"back",    back},        /* HP-specific backspace */
  45. {"bell",    bell},        /* ring bell */
  46. {"clear",    clearit},    /* TI-specific clear calculator state */
  47. {"cosine",    cosine},    /* trigonometric function cosine */
  48. {"decimal",    decimal},    /* decimal point */
  49. {"degree",    degree},    /* degree, radian, grad switch */
  50. {"digit",    digit},        /* numeric key */
  51. {"divide",    divide},    /* division */
  52. {"e",        e},        /* the natural number e */
  53. {"enter",    enter},        /* HP-specific enter */
  54. {"epower",    epower},    /* e raised to a power */
  55. {"equal",    equal},        /* TI-specific = */
  56. {"exchange",    exchange},    /* TI-specific exchange memory and display */
  57. {"factorial",    factorial},    /* factorial function */
  58. {"inverse",     inverse},    /* inverse */
  59. {"leftParen",    leftParen},    /* TI-specific left parenthesis */
  60. {"logarithm",    logarithm},    /* logarithm base 10 */
  61. {"multiply",    multiply},    /* multiplication */
  62. {"naturalLog",    naturalLog},    /* natural logarithm base e */
  63. {"negate",    negate},    /* change sign */
  64. {"nop",        nop},        /* no operation, rings bell */
  65. {"off",        off},        /* clear state */
  66. {"pi",        pi},        /* the number pi */
  67. {"power",    power},        /* raise to an arbitrary power */
  68. {"quit",    quit},        /* quit */
  69. {"recall",    recall},    /* memory recall */
  70. {"reciprocal",  reciprocal},    /* reciprocal function */
  71. {"rightParen",    rightParen},    /* TI-specific left parenthesis */
  72. {"roll",    roll},        /* HP-specific roll stack */
  73. {"scientific",    scientific},    /* scientfic notation (EE) */
  74. {"selection",    selection},    /* copy selection */
  75. {"sine",    sine},        /* trigonometric function sine */
  76. {"square",    square},    /* square */
  77. {"squareRoot",    squareRoot},    /* square root */
  78. {"store",    store},        /* memory store */
  79. {"subtract",     subtract},    /* subtraction */
  80. {"sum",        sum},        /* memory summation */
  81. {"tangent",    tangent},    /* trigonometric function tangent */
  82. {"tenpower",    tenpower},    /* 10 raised to to an arbitrary power */
  83. {"XexchangeY",    XexchangeY}    /* HP-specific exchange X and Y registers */
  84. };
  85.